Skip to main content Skip to complementary content

Recovering from data folder loss or corruption

During normal operation, Qlik Replicate maintains the replication state in the following location:

<Data_Folder_Path>\data\tasks\<task_name>\StateManager

This enables tasks that cannot be resumed normally (due to corrupt swap files, for example) to be recovered using the Recover using locally stored checkpoint option described in Advanced Run Options.

However, if the files in the data folder become corrupted or if the storage device containing the data folder fails, tasks must be recovered using the means described below.

This option is supported when replicating between the following endpoints only:

Supported source and target endpoints
Supported source endpoints Supported target endpoints
  • Amazon RDS for MySQL
  • Amazon RDS for PostgreSQL
  • Amazon RDS for SQL
  • AWS Aurora Cloud for PostgreSQL
  • Google Cloud SQL for MySQL
  • Google Cloud SQL for PostgreSQL
  • IBM DB2 for z/OS
  • Microsoft Azure Database for MySQL
  • Microsoft Azure SQL Managed Instance
  • Microsoft SQL Server
  • MySQL
  • Oracle
  • PostrgreSQL
  • SAP HANA
  • Amazon Redshift
  • Google Cloud SQL for PostgreSQL
  • Microsoft Azure Database for MySQL
  • Microsoft Azure Database for PostgreSQL
  • Microsoft SQL Server
  • MySQL
  • Oracle
  • PostgreSQL
  • Snowflake on Azure
  • Snowflake on Google
  • Snowflake on AWS

Setting up and initiating task recovery

For recovery to be successful, the source database transaction logs must be available from the time the task failed.

  1. Design a task. Make sure to enable the Store task recovery data in target database option in the Task Settings' Change Processing Tuning tab. This option can be enabled at any time during Change Processing, although it must be enabled before Change Processing completes.
  2. Export the task definitions as described Exporting tasks.
  3. Run the task.

In addition to the selected source tables, the task will write the checkpoint data to the following table in the target database (and automatically create the table if it has not already been created by another task):

attrep_txn_state

  1. Import the task definition exported when you set up the task.
  2. Enter the passwords in the endpoint connection settings.
  3. Access the attrep_txn_state table on the target database and locate the failed task in the TASK_NAME column. If there are tasks with the same name running on multiple Replicate Servers, you will also need to locate the appropriate server in the SERVER_NAME column. After locating the relevant task, copy the value in the corresponding CHECKPOINT column.
  4. Select the Recover using checkpoint stored on target option and then provide the CHECKPOINT value (preferably by pasting) as described in Advanced Run Options.
  5. Click OK to start the recovery.

During recovery, Replicate does not write anything to the target database until it identifies the commit event corresponding to the CHECKPOINT value. Once it identifies the CHECKPOINT commit event, recovery is performed and the task reverts to standard operation.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!